package com.blocks.blocks;

import jme3test.bullet.BombControl;

import com.blocks.ScriptBlocksApplication;
import com.blocks.controller.BlockBombControl;
import com.jme3.audio.AudioNode;
import com.jme3.bullet.collision.shapes.BoxCollisionShape;
import com.jme3.effect.ParticleEmitter;
import com.jme3.effect.ParticleMesh;
import com.jme3.material.Material;
import com.jme3.math.ColorRGBA;
import com.jme3.math.Vector3f;
@Deprecated
public class BombBlock extends Block{
//	String defaultTexture = "Textures/Blocks/Bomb_alpha.tga";
//	public BombBlock(String name, Long masterId) {
//		
//		super(name, masterId);
//
//		initEffect();
//	}
//	public void initPhysics() {
//		this.addControl(new BlockBombControl(ScriptBlocksApplication.getInstance().getAssetManager(), new BoxCollisionShape(
//				new Vector3f(1, 1, 1)), 1));
//		ScriptBlocksApplication.getInstance().getPhysicsSpace().add(this);
//	}
//	private void initEffect() {
//
//	    ParticleEmitter fire = new ParticleEmitter("Emitter", ParticleMesh.Type.Triangle, 30);
//	    Material mat_red = new Material(ScriptBlocksApplication.getInstance().getAssetManager(), "Common/MatDefs/Misc/Particle.j3md");
//	    mat_red.setTexture("Texture", ScriptBlocksApplication.getInstance().getAssetManager().loadTexture("Effects/Explosion/flame.png"));
//	    fire.setMaterial(mat_red);
//	    fire.setImagesX(2); fire.setImagesY(2); // 2x2 texture animation
//	    fire.setEndColor(  new ColorRGBA(1f, 0f, 0f, 1f));   // red
//	    fire.setStartColor(new ColorRGBA(1f, 1f, 0f, 0.2f)); // yellow
//	    fire.setInitialVelocity(new Vector3f(0, 2, 0));
//	    fire.setStartSize(1.5f);
//	    fire.setEndSize(0.1f);
//	    fire.setGravity(0);
//	    fire.setLowLife(0.5f);
//	    fire.setHighLife(3f);
//	    fire.setVelocityVariation(0.3f); 
//	    this.attachChild(fire);
//	}

}
